package com.ed.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ed.domain.Faq;
import com.ed.dto.AnswerQDTO;
import com.ed.dto.PageQueryDto;
import com.ed.dto.SubmitDto;
import com.ed.result.PageResult;
import com.ed.vo.QuesVO;

import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

public interface IFaqQuestionService extends IService<Faq> {
    
    ConcurrentHashMap<String, Long> IdempotentMap = new ConcurrentHashMap<>();
    
    void AddFaq(Faq faq);

    void DeleteFaq(Integer id);

    void UpdateFaq(Faq faq);

    QuesVO getFaq(Integer id);

    List<QuesVO> getFaqs();

    PageResult PageQuery(PageQueryDto pageQueryDto);

    Integer calculateScore(SubmitDto submitDto);
    
    void checkAndRecordIdempotent(String IdempotentKey);
}
